﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using FRL.DebtChased.Repository;
using FRL.DebtChased.Repository.ViewModels;
using FRL.DebtChased.Website;

namespace WebApplication.Finance
{

	/// <summary>
	/// Declaration of Config
	/// </summary>
	public partial class Config : System.Web.UI.Page
	{

		/////////////////////////////////////////////////////////////
		// Event handlers

		protected void Page_Load(object sender, EventArgs e)
		{

			// If this is a postback...
			if (this.IsPostBack)
			{

			}
			else
			{

				// Declare an entities object
				using (DebtChasedEntities ent = new DebtChasedEntities())
				{

					// Load the models and bind to grids
					DevMessageViewModel devMessageModel = new DevMessageViewModel(ent);
					gridDevMessages.DataSource = devMessageModel.Elements;
					gridDevMessages.DataBind();

				}

				// Bind the country code combo
				cboDefaultCountry.BindToDictionary(CountryCodes.Dictionary);
				cboDefaultCountry.SelectedValue = MyApplication.BindMyApplication().LocationCountryCode;

			}

		}

		protected void butSaveConfig_Click(object sender, EventArgs e)
		{


		}

	}

}